<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <link rel="stylesheet" href="./assets/mui/css/mui.css">
    <link rel="stylesheet" href="./assets/fontAwesome/css/font-awesome.css">
    <link rel="stylesheet" href="./css/common.css">
    <link rel="stylesheet" href="./css/cart.css">
</head>

<body>
    <header class="lt-header">
        <h4 class="lt-title">
            <a class="lt-h-left" href="javascript:history.back();">
                <span class="fa fa-arrow-left"></span>
            </a>
            购物车
            <a class="lt-h-right" href="#">
                <span class="fa fa-refresh"></span>
            </a>
        </h4>
    </header>

    <!-- 主要内容部分 -->
    <!--下拉刷新容器-->
    <div class="cart-content">
        <div id="refreshContainer" class="mui-content mui-scroll-wrapper">
            <div class="mui-scroll">
                <!-- 左滑显示多功能菜单容器 -->
                <ul id="OA_task_2" class="mui-table-view">
                    <!-- 这里的内容动态生成 -->
                </ul>
            </div>
        </div>
    </div>

    <!-- 生成订单部分 -->
    <div class="creat-order mui-clearfix">
        <span class="cre-total mui-pull-left">订单总额：¥ 0.00</span>
        <a href="javascript:;" class="add-order mui-pull-right">生成订单</a>
    </div>

    <footer class="lt-footer mui-clearfix">
        <a href="/mobile/index.html">
            <span class="mui-icon mui-icon-home"></span>
            <p>首页</p>
        </a>
        <a href="/mobile/category.html">
            <span class="mui-icon mui-icon-bars"></span>
            <p>分类</p>
        </a>
        <a class="active" href="/mobile/cart.html">
            <span class="fa fa-shopping-cart"></span>
            <p>购物车</p>
        </a>
        <a href="/mobile/user/index.html">
            <span class="fa fa-user"></span>
            <p>会员中心</p>
        </a>
    </footer>
</body>

<script type="text/html" id="cartTpl">
    {{each data as value}}
    <li data-obj="{{objToJson(value)}}" class="mui-table-view-cell mui-transitioning">
        <div class="mui-slider-right mui-disabled">
            <a class="edit-btn mui-btn mui-btn-primary" style="transform: translate(0px, 0px);">编辑</a>
            <a class="delete-btn mui-btn mui-btn-danger" style="transform: translate(-89px, 0px);">删除</a>
        </div>
        <div class="mui-slider-handle" style="transform: translate(0px, 0px);">
            <div class="mui-table-cell">
                <!-- 主要内容部分 -->
                <div class="cart-conent mui-clearfix">
                    <!-- 左边的图片和复选框 -->
                    <div class="left-content mui-pull-left">
                        <img src="./images/detail.jpg" alt="">
                        <input class="check-inp" type="checkbox" name="" id="">
                    </div>
                    <!-- 右边的商品详情 -->
                    <div class="right-content mui-pull-right">
                        <p class="mui-ellipsis-2">{{value.proName}}</p>
                        <p class="mui-clearfix">
                            <span class="new-price">￥{{value.price}}</span>
                            <span class="old-price">￥{{value.oldPrice}}</span>
                            <span class="pro-number mui-pull-right">x{{value.num}}双</span>
                        </p>
                        <p>
                            <span class="pro-size">鞋码：{{value.size}}</span>
                        </p>
                        <span class="load-right mui-icon mui-icon-forward"></span>
                    </div>
                </div>
            </div>
        </div>
    </li>
{{/each}}
</script>
<!-- 弹出框里面的结构 -->
<script type="text/html" id="editTpl">
    <!-- 商品尺码 -->
    <div class="pro-size">
        <p>尺码：</p>
        {{each sizeArr as value}}
        {{if size==value}}
        <span class="active">{{value}}</span>
        {{/if}}
        {{if size!=value}}
        <span>{{value}}</span>
        {{/if}}
        {{/each}}
    </div>
    <!-- 商品数量 -->
    <div class="pro-num">
        <span>数量：</span>
        <div class="mui-numbox" data-numbox-min='0' data-numbox-max="{{productNum}}">
            <!-- "-"按钮，点击可减小当前数值 -->
            <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
            <input class="mui-numbox-input" value="{{num}}" type="number" />
            <!-- "+"按钮，点击可增大当前数值 -->
            <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
        </div>
        <span>剩余：{{productNum}}件</span>
    </div> 
</script>
<script src="./assets/artTemplate/template.js"></script>
<script src="./assets/mui/js/mui.js"></script>
<script src="./assets/zepto/zepto.min.js"></script>
<script src="./js/common.js"></script>
<script src="./js/cart.js"></script>

</html>